# Maintainer: Maxime Gauduin <alucryd@archlinux.org>
# Contributor: Gustavo Alvarez <sl1pkn07@gmail.com>

pkgname=vapoursynth-plugin-lsmashsource
pkgver=A.5b
pkgrel=2
epoch=1
pkgdesc='L-SMASH source plugin for Vapoursynth'
arch=(loong64 x86_64)
url=https://github.com/AkarinVS/L-SMASH-Works
license=(custom)
depends=(
  glibc
  vapoursynth
  libavcodec.so
  libavformat.so
  libavutil.so
  liblsmash.so
  libswscale.so
)
makedepends=(
  git
  meson
)
_tag=fb891d030c26af63abf19ab098638a40e8a1d27b
source=(vapoursynth-plugin-lsmashsource::git+https://github.com/AkarinVS/L-SMASH-Works.git#tag=${_tag})
b2sums=(SKIP)

pkgver() {
  cd vapoursynth-plugin-lsmashsource
  git describe --tags | sed 's/^v//'
}

build() {
  arch-meson vapoursynth-plugin-lsmashsource/VapourSynth build
  meson compile -C build
}

package(){
  meson install --destdir "${pkgdir}" -C build
  install -Dm 644 vapoursynth-plugin-lsmashsource/VapourSynth/README -t "${pkgdir}"/usr/share/doc/vapoursynth/plugins/lsmashsource/
  install -Dm 644 vapoursynth-plugin-lsmashsource/VapourSynth/LICENSE -t "${pkgdir}"/usr/share/licenses/vapoursynth-plugin-lsmashsource/
}

# vim: ts=2 sw=2 et:
